package com.ww.aviator.func;

import com.googlecode.aviator.AviatorEvaluator;
import com.googlecode.aviator.Expression;
import com.googlecode.aviator.runtime.JavaMethodReflectionFunctionMissing;

import java.io.IOException;
import java.net.URL;

public class ThreadTest {

    public static void main(String[] args) throws IOException, IllegalAccessException, NoSuchMethodException {
        AviatorEvaluator.setFunctionMissing(JavaMethodReflectionFunctionMissing.getInstance());
        URL url = FuncTest.class.getClassLoader().getResource("av/func/runnable.av");
        assert url != null;
        Expression compile = AviatorEvaluator.getInstance().compileScript(url.getPath());
        compile.execute();
    }
}
